package cn.hxzy.feign.clients;

import cn.hxzy.common.Result;
import cn.hxzy.entity.order.vo.SelectVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("owner-source")
public interface SourceListClient {
    //查询所有货源列表
    @GetMapping("/sourceList/selectSource")
    Result selectSource();

    //根据id查询货源列表
    @GetMapping("/sourceList/selectSourceById/{sourceId}")
    Result selectSourceById(@PathVariable String sourceId);

    //修改装货量
    @GetMapping("/sourceList/updateLoadingCount/{loadingCount}/{sourceId}")
    Result updateLoadingCount(@PathVariable Double loadingCount, @PathVariable String sourceId);

    //修改卸货量
    @GetMapping("/sourceList/updateUnloadingCount/{unloadingCount}/{sourceId}")
    Result updateUnloadingCount(@PathVariable Double unloadingCount, @PathVariable String sourceId);

    //修改货物余量
    @GetMapping("/sourceList/updateGoodsHeadroom/{goodsHeadroom}/{sourceId}")
    Result updateGoodsHeadroom(@PathVariable Double goodsHeadroom, @PathVariable String sourceId);

    @GetMapping("/sourceList/sourceListAll/{loading}/{unLoading}/{i}")
    Result sourceListAll(@PathVariable String loading, @PathVariable String unLoading, @PathVariable int i);

    @GetMapping("/sourceList/selectSourceByStatus")
    Result selectSourceByStatus();

    @PostMapping("/sourceList/selectMoreBySiteName")
    Result selectMoreBySiteName(@RequestBody SelectVo selectVo);
}
